let a: object;
a = [];
a = {};
a = function () {};

let b: {
  a: number;
  c: string;
  d?: boolean;
};

b = {
  a: 10,
  c: "hello",
};

b = {
  a: 90,
  c: "你好",
  d: true
};

let c:{
    a:number,
    b?:string,
    [propName:string]:any
}

c = {
    a: 12,    
    hi: '哇',
    wo: 0
}

let d: (a:number,b:number) => number;
 console.log("你好")
d = function fn1(a:number,b:number) {
    return a + b;
}

let e:string[];
let f:number[];

let g =Array<boolean>;


let h:[number,boolean,boolean];

h = [1,true,true];


enum Sex {
    man,
    woman
}
let k: {
    name: string,
    age: number,
    sex: Sex
}
k = {
    name:"孙悟空",
    age: 10,
    sex: Sex.man
}

console.log(k.sex === Sex.woman ? '男' : '女')

type myType = 1|2|3|4;

let l:myType = 1;
let y:myType = 4;

let o:{name:string} & {age:number}
o ={name:"孙悟空",age:20}
export {};